UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WCL+EEfr1dJhs0jVqfAZbdfI4GhoN2iRVDYE8xOv3QM='
WHERE
key_id = '66624ed6fa953f0369acfc6bb4359f5482ab505289d34b865de61b1bb125f1c2'
AND (
token = 'WCL+EEfr1dJhs0jVqfAZbdfI4GhoN2iRVDYE8xOv3QM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)