UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LOzS0ZNF6+tdCS7YR6hD2tCNAHfRRBMDOFicejaDFRg='
WHERE
key_id = '68f5316c54f4a9a91bdff4c706cca06526df3102241e1d7cc941126c4a023360'
AND (
token = 'LOzS0ZNF6+tdCS7YR6hD2tCNAHfRRBMDOFicejaDFRg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)