UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MuG5MMbJMM0kjrOOhoqQRGRuMIbPppq+UITco8L6PD8='
WHERE
key_id = '75e19e4b58994fa1657e8972c90c6e9db8050c9bfc4e50ebec6c39d04689cb90'
AND (
token = 'MuG5MMbJMM0kjrOOhoqQRGRuMIbPppq+UITco8L6PD8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)