UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pGbo92ONRmF+eLYpQzaDNf0wemXEZpMjg7c5g6CvGNA=' 
WHERE 
  key_id = '4816477585eb52c6a979aaee09a587cb01e67ad46f5d2792a5bc885b5b9a669b' 
  AND (
    token = 'pGbo92ONRmF+eLYpQzaDNf0wemXEZpMjg7c5g6CvGNA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029