UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '13jx3QQitngYjARVl7z3qqhIR63nhNmZmPerQ8Z6XmM='
WHERE
key_id = 'f8fa278d96124808d358b76cbb2e23339f116fc969d6b97a315d5c7686615033'
AND (
token = '13jx3QQitngYjARVl7z3qqhIR63nhNmZmPerQ8Z6XmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)