UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ab0sfROyym5fcl4mINTdC7bYLjXtsGPV/NRffnwykzc='
WHERE
key_id = '55eab002069192c52c899512a4989f41e798443def2d545f2639077605d5aae3'
AND (
token = 'ab0sfROyym5fcl4mINTdC7bYLjXtsGPV/NRffnwykzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)