UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8F3CyLXyE1TuAR+Ht5/0uJWNQRiHKHdWLz/f6bIL7f8=' 
WHERE 
  key_id = '08ffde5b946704911e12383fa15e8c005c83fe53a6b0bad4cd2e9d1a8da8850a' 
  AND (
    token = '8F3CyLXyE1TuAR+Ht5/0uJWNQRiHKHdWLz/f6bIL7f8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046