UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4ZHQEd1kR1aJYljD6pLwnPOagaxw97QHH8MTnbV7kSU=' 
WHERE 
  key_id = '892bebba91982fb62d0d8e87e3e6660c30e3305cd3bf35bd2bf6f3fef3ee3d34' 
  AND (
    token = '4ZHQEd1kR1aJYljD6pLwnPOagaxw97QHH8MTnbV7kSU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034