UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SAaQrW3gXR5PGtOK8DUD5+mHc6ha11GJ3iqnaxoKlZc=' 
WHERE 
  key_id = 'c892126cd493438c91644d7496faf8c18d765f3e6486233b2fd75613f509a23e' 
  AND (
    token = 'SAaQrW3gXR5PGtOK8DUD5+mHc6ha11GJ3iqnaxoKlZc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014