UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0NwaD40a6gmz4/DpQUi6gO6bU8MwSfdP8h62szLqubw='
WHERE
key_id = '0abfd0b1d8fbe84688656fe869938eec51a3ea37f3eda007a2419c5f43586ef8'
AND (
token = '0NwaD40a6gmz4/DpQUi6gO6bU8MwSfdP8h62szLqubw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)