UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EKccMPfz4koUG5k8SiX4u28AzGW+ITh1yIz+TF1STQ0='
WHERE
key_id = '5fb418e5a4ee65da2f4eec78f3e5d4f584f1a865a526b6179af884dd3566deb3'
AND (
token = 'EKccMPfz4koUG5k8SiX4u28AzGW+ITh1yIz+TF1STQ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)