UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gz3kfdk4Hg3+gk6bRhyPAbxvtbfg+VKDxsvFoBtV1eI='
WHERE
key_id = '2a756358d57c01bf9b2b3a86d227405518a8c6ddaff252d5581bd7ca48ae79b8'
AND (
token = 'gz3kfdk4Hg3+gk6bRhyPAbxvtbfg+VKDxsvFoBtV1eI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)