UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eRBz/ScjR1QmFl4YJj9YSaouquXuu0XCI8LoHRgsKMQ='
WHERE
key_id = '9f8ba9677bc136c04cbc1867ef6189e7174d4c72b3430c1172350feb5fa3fd53'
AND (
token = 'eRBz/ScjR1QmFl4YJj9YSaouquXuu0XCI8LoHRgsKMQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)