UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '75WmK3RjVUUJQilFTR3A3W2eQr9PzCWY7h5HgzlJpAg=' 
WHERE 
  key_id = '163e95e275a6b047791fb3c06315bdb6cdfc028791c51185e4cacf7dd5c413dc' 
  AND (
    token = '75WmK3RjVUUJQilFTR3A3W2eQr9PzCWY7h5HgzlJpAg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049