UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yU1ofte08aVf+PzqtUaSVspmR147OZ17oAU/BLPEXqs='
WHERE
key_id = '363b88acc751a9326eea4cdeb58e5b3dcb22376a0f4ed570742724674ac2258a'
AND (
token = 'yU1ofte08aVf+PzqtUaSVspmR147OZ17oAU/BLPEXqs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)