UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6LHtB7eFGZU9APgNILdEdX9kd1e/lnnsMlmPtnwJWwY=' 
WHERE 
  key_id = '4e5e237d972dd9a1531f11a7bdd8a6c686b3358371af2eb310eb67dc5cd49d6e' 
  AND (
    token = '6LHtB7eFGZU9APgNILdEdX9kd1e/lnnsMlmPtnwJWwY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023