UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/6wQLGx6ABCeEWVvrTnG3fGXx22Hn3Rpr0HXOgSUe8='
WHERE
key_id = '55ae60b1c6430df030dfa86e53e067dc7bb1b1abbc4bc9bd2638b6f71efa7fe4'
AND (
token = 'e/6wQLGx6ABCeEWVvrTnG3fGXx22Hn3Rpr0HXOgSUe8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)