UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dDfJs2ejqHPvZuqJhSaiagHbQQUW22Snw/WwaLzRn2s='
WHERE
key_id = '60bc4df8d166079acce346c1c4d5db0690e53de5414cc22a4f34212b3c45c024'
AND (
token = 'dDfJs2ejqHPvZuqJhSaiagHbQQUW22Snw/WwaLzRn2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)