UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l2rlunLJ7gDjUDWpgMh5xcn5dXFmISKAyIoP85MD8dA='
WHERE
key_id = '36dfbffe3bae5da5712813b9ede1d4d7d198c3ce79bcaabb9d5cf62738ba717a'
AND (
token = 'l2rlunLJ7gDjUDWpgMh5xcn5dXFmISKAyIoP85MD8dA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)