UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DWSSl/Dmu1CunoVCfF/VT6tZro/ZPSs4NmNgg88Is9Q='
WHERE
key_id = 'e9837f279fe303d90f2cc4b0571253ae8f31b16d89e3d79a361ef8ac4eff480e'
AND (
token = 'DWSSl/Dmu1CunoVCfF/VT6tZro/ZPSs4NmNgg88Is9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)