UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '67tK+bjyNURfrTR78b5v0ZRgwNkOsh1qs0gI/wk8m7k='
WHERE
key_id = '992fab681c9803be8e44e64792b006f1dd760dc68ebfceaff8c82ac5447cdea5'
AND (
token = '67tK+bjyNURfrTR78b5v0ZRgwNkOsh1qs0gI/wk8m7k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)