UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HTjxVQ3XlqCVlZAO8fHZlkd2hUBxaZB9dV25tS0HpmY=' 
WHERE 
  key_id = 'b19129b43a188c8405334a6e3e960878c0dc024832eca5af6f698a831b9b960d' 
  AND (
    token = 'HTjxVQ3XlqCVlZAO8fHZlkd2hUBxaZB9dV25tS0HpmY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038