UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MXGiQQHpE3duMku6XrNeJQwG9/tMaYoHy9MKFfc1lgg='
WHERE
key_id = '4878a4f045bffc8fafb6a3e4d5e7c6587520f8d99907e7ac26289ac103a7f7ed'
AND (
token = 'MXGiQQHpE3duMku6XrNeJQwG9/tMaYoHy9MKFfc1lgg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)