UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8OOy25DB+7/MQa7kfSnXiaTUPL8jI1qtpykWRUy8BwU=' 
WHERE 
  key_id = '2753127de40c09c9702002f0c82312c5cc5e80e7d357f9004570b73df1226dbe' 
  AND (
    token = '8OOy25DB+7/MQa7kfSnXiaTUPL8jI1qtpykWRUy8BwU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050