UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'L/dDmG/gQaXp4Dy2SJb7XrW8oR6CxMuz9vwMzwwA7zw=' 
WHERE 
  key_id = 'b30f9f225f4dd6281b66d6861c17d847966562b9801b9cb9ad258db8d8c9b7ba' 
  AND (
    token = 'L/dDmG/gQaXp4Dy2SJb7XrW8oR6CxMuz9vwMzwwA7zw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042