UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DlppQmF++dRPQ8dgx1QQ4Q61VaQrjLw46ZNPKHC4mvU='
WHERE
key_id = 'c84bacec6cc4b3a3a71d35f39f68a77b88c1550b5a5a108523e86df9c29aae87'
AND (
token = 'DlppQmF++dRPQ8dgx1QQ4Q61VaQrjLw46ZNPKHC4mvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)