UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tc75i19Gh3+FNKdSxuwZSHBW59yyEsZr/hnQ6V1NGj4='
WHERE
key_id = '73ad9e3b4994e6d361e3bf9ad1fa365125a70bfdc745e99af8d4907ff37c5df6'
AND (
token = 'tc75i19Gh3+FNKdSxuwZSHBW59yyEsZr/hnQ6V1NGj4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)