UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SlCd8j9dMsrLzninhGyuFaHRINV39bOB+mlqsmG/7Tg='
WHERE
key_id = 'f5e54734e98a0866b1cfb6dc34b1fb8e85c617994cc25618dc9f0c42c380c788'
AND (
token = 'SlCd8j9dMsrLzninhGyuFaHRINV39bOB+mlqsmG/7Tg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)