UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '91yB3/y25vEUZdm1utPMJnSr7Y/S2CSlVDNXU8c+/Yo='
WHERE
key_id = '36050dc55bc89c5dc7a3b17b9ea698892dce4ae9a3046d36bf4c3da4cc7d4d80'
AND (
token = '91yB3/y25vEUZdm1utPMJnSr7Y/S2CSlVDNXU8c+/Yo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)