UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rusdjEEzoSIuFbfD2SWWnceq+1M/rXP+KI/vboHcvrg='
WHERE
key_id = '60ffd25da862e9b0be20ec2d4cfe330d04f55878cca8d32e1fcda251afea467c'
AND (
token = 'rusdjEEzoSIuFbfD2SWWnceq+1M/rXP+KI/vboHcvrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)