UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YIfjqG/Y06wYCN/Mo0v6zv/NKajVEcjxL/L4htZaf3E='
WHERE
key_id = '74dc2dd4b469ed5f752d0c2bad64f256401c8b7f973b3c2c5fb0ded7d7b0d109'
AND (
token = 'YIfjqG/Y06wYCN/Mo0v6zv/NKajVEcjxL/L4htZaf3E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)