UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OvRbtrjoQGrOmlUn4XZ0GsNcQV78QefGl7p2daLCf/U='
WHERE
key_id = '4c5a421dbff2c119071108ec245f9887a6893047b2850743fa479d3b035c1229'
AND (
token = 'OvRbtrjoQGrOmlUn4XZ0GsNcQV78QefGl7p2daLCf/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)