UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eOt0I6NHXToK+GTAyrVAjqWiTRnxohqq8jvvo1mlD/E='
WHERE
key_id = '365e220be626753b1694ad1a0604f612f7eccc7636a0dbf925d3b556145f62be'
AND (
token = 'eOt0I6NHXToK+GTAyrVAjqWiTRnxohqq8jvvo1mlD/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)