UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '29hrf6h5tKX4QKe71nTdj5r8644GPnSxsYvUu+yPE9A=' 
WHERE 
  key_id = '92e7b493c96f042a737cf0d553b674c7d2b1c1e23f3312b6070ccae69130c420' 
  AND (
    token = '29hrf6h5tKX4QKe71nTdj5r8644GPnSxsYvUu+yPE9A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059