UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/FCZX1XY5oby5/fw71cv33BZ3CdZOGk4mNvH41sBmc='
WHERE
key_id = 'ddeb27dfa768bbd690f526617c2ffef52b8541e9257661b97ff7b8ec2755b52c'
AND (
token = 'e/FCZX1XY5oby5/fw71cv33BZ3CdZOGk4mNvH41sBmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)